﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class EmailSendBLL
    {
        public EmailSendBLL() { }
        EmailSendDAO dao = new EmailSendDAO();

        public bool Add(EmailSend entity)
        {
            return dao.Add(entity);
        }
        public bool Modity(EmailSend entity)
        {
            return dao.Modity(entity);
        }
        public bool Delete(int id)
        {
            return dao.Delete(id);
        }

        public IList<EmailSend> GetAllEmailSend()
        {
            return dao.GetAllEmailSend();
        }
        public IList<EmailSend> GetAllEmailSend(string name)
        {
            return dao.GetAllEmailSend(name);
        }

        public int GetTotal()
        {
            return dao.GetTotal();
        }

        public EmailSend GetEmailSendById(int id)
        {
            return dao.GetEmailSendById(id);
        }
        /// <summary>
        /// 返回false时  可以订阅
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        public bool isExists(string email,string name)
        {
            return dao.isExists(email,name);
        }
    }
}
